{include file="public/header" /}

<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <form class="form-horizontal" method="post">
            <div class="col-sm-12">
                <div class="tabs-container">
                    <div class="tab-content">
                        <div class="ibox-content">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">城市：</label>
                                <div class="col-sm-9">
                                    <?php $getcity = input('get.city');?>
                                    <a href="{:url('location', ['action' => 'add'])}?id={present name='name'}{$name.id}{/present}"><input name="city" type="text"  class="form-control"  placeholder="点击获取地址" value="{if condition='$getcity'}{$getcity}{else /}{present name='name'}{$name.city}{else /}{/present}{/if}"></a>
                                    <input type="hidden" name="longitude" value="{:input('get.longitude')}">
                                    <input type="hidden" name="latitude" value="{:input('get.latitude')}">
                                </div>
                            </div>
                            {notpresent name="name"}
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">类型：</label>
                                    <div class="col-sm-9">
                                        <div class="radio i-checks">
                                            <label>
                                                <input type="radio" value="1" name="types" {present name="name"}{eq name="name.types" value="1"}checked{/eq}{else /}checked{/present}>家族
                                            </label>
                                            <label>
                                                <input type="radio" value="2" name="types" {present name="name"}{eq name="name.types" value="2"}checked{/eq}{/present}>群聊
                                            </label>
                                        </div>
                                    </div>
                                </div>
                            {/notpresent}
                            <div class="form-group">
                                <label class="col-sm-2 control-label">状态：</label>
                                <div class="col-sm-9">
                                    <div class="radio i-checks">
                                        <label>
                                            <input type="radio" value="1" name="status" {present name="name"}{eq name="name.status" value="1"}checked{/eq}{else /}checked{/present}>正常
                                        </label>
                                        <label>
                                            <input type="radio" value="0" name="status" {present name="name"}{eq name="name.status" value="0"}checked{/eq}{/present}>审核
                                        </label>
                                        <label>
                                            <input type="radio" value="-1" name="status" {present name="name"}{eq name="name.status" value="-1"}checked{/eq}{/present}>冻结
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">名称：</label>
                                <div class="col-sm-9">
                                    <input name="name" type="text"  class="form-control" required="required" value="{present name='name'}{$name.name}{/present}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">logo：</label>
                                <div class="col-sm-9">
                                    <div class="input-group">
                                        <img src="{present name='name.logo'}{if condition='$name.logo'}__ROOT__{$name.logo}{else /}__IMG__add_img.png{/if}{else /}__IMG__add_img.png{/present}" id="imageimg" style="max-width: 100%;max-height: 600px">
                                        <input name="logo" type="hidden"  id="image" class="form-control" value="{present name='name'}{$name.logo}{/present}">
                                        <span class="input-group-btn">
                                            <button type="button" class="btn btn-primary" id="tubiao">上传</button>
                                        </span>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">简介：</label>
                                <div class="col-sm-9">
                                    <textarea class="form-control" name="description">{present name="name"}{$name.description}{/present}</textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">活跃度：</label>
                                <div class="col-sm-9">
                                    <input name="active" type="number"  class="form-control" required="required" value="{present name='name'}{$name.active}{/present}">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
    </div>
</div>
</form>
</div>
</div>

{include file="public/footer" /}
{load href="__PLUGINS__iCheck/icheck.min.js"}
{load href="__PLUGINS__iCheck/custom.css"}

<script type="text/javascript">
    $(document).ready(function(){
        $(".i-checks").iCheck({
            checkboxClass: "icheckbox_square-green",
            radioClass: "iradio_square-green",
        })
    })
</script>

{include file="public/bottom" /}
 
